package com.globopt.global.algorithm.functions;

import com.globopt.global.algorithm.Function;
import com.globopt.global.algorithm.Point;

/**
 * Sample test function.
 * 
 * @author Richard Gasztany 2012.11.25.
 * 
 */
public class F1 extends Function {

	public F1() {
		this.nvars = 2;
	}

	@Override
	public double evaluation(Point p) {
		double x = p.getCoordinate(0);
		double y = p.getCoordinate(1);
		return 100.0 * (x * x - y) * (x * x - y) + (x - 1.0) * (x - 1.0);
	}
}
